package com.example.shiyansan.entity;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
    private int userId;
    @NotNull(message = "用户名不能为空")
    private String username;
    @Pattern(regexp = "^.{1,18}$")
    private String password;
    @Email
    private String email;
}
